<?php

namespace Addons\Simditor;
use Common\Controller\Addon;

/**
 * Simditor编辑器插件
 * @author yangweijie
 */

    class SimditorAddon extends Addon{

        public $info = array(
            'name'=>'Simditor',
            'title'=>'Simditor编辑器',
            'description'=>'基于Simditor的可以markdown和富文本切换的适合前后台编辑器',
            'status'=>1,
            'author'=>'yangweijie',
            'version'=>'0.1'
        );

        public function install(){
            return true;
        }

        public function uninstall(){
            return true;
        }

        //实现的documentEditFormContent钩子方法
        public function documentEditFormContent($param){
            $this->assign('addons_data', $param);
            $this->assign('addons_config', $this->getConfig());
            $this->display('content');
        }

        //实现的adminArticleEdit钩子方法
        public function adminArticleEdit($param){
            $this->documentEditFormContent($param);
        }

    }
